<?php 
    require_once("autoload.php");
    ob_start();
    
    if(isset($_POST['btCadastrar'])){
        include("inc/cadastrar.php");
    }
?>
<form method="post">
<div id="divCadastro">
	<table align="center" border="0">
		<caption>Cadastro</caption>
        <tr>
            <td valign="baseline" width="125">
                Nome:
            </td>
            <td colspan="3">
                <input type="text" name="txtNome" class="texto" size="65" maxlength="45" />
            </td>
        </tr>
        <tr>
            <td valign="baseline">
                Endere&ccedil;o:
            </td>
            <td colspan="3">
                <input type="text" name="txtEndereco" class="texto" size="65" maxlength="45" />
            </td>
        </tr>
        <tr>
            <td valign="baseline">
                Bairro:
            </td>
            <td width="143">
                <input type="text" name="txtBairro" class="texto" size="25" maxlength="25" />
            </td>
            <td width="48" valign="baseline">
                Cidade:
            </td>
            <td>
                <input type="text" name="txtCidade" class="texto" size="25" maxlength="25" />
            </td>
        </tr>
        <tr>
            <td valign="baseline">
                Cep:
            </td>
            <td>
                <input type="text" name="txtCep" class="texto" id="txtCep" size="12" maxlength="12" />
            </td>
            <td valign="baseline">
                Estado:
            </td>
            <td valign="baseline">
                <select name="cmbUf">
                    <?php 
                        $uf = new Projeto_Estados();
                        $listauf=$uf->Lista();
                        foreach ($listauf as $lista){?>
                            <option value="<?php echo $lista->codigo; ?>">
								<?php
									echo $lista->uf;
								?>
                            </option>
                        <?php
                        }//fim foreach
                    ?>
                </select>
            </td>
        </tr>
        <tr>
            <td valign="baseline">
                RG:
            </td>
            <td colspan="3">
                <input type="text" name="txtRg" id="txtRg" class="texto" size="25" maxlength="15" />
            </td>
       </tr>
       <tr>
            <td valign="baseline">
                Telefone:
            </td>
            <td colspan="3">
                <input type="text" name="txtTelefone" id="txtTelefone" class="texto" size="25" maxlength="15" />
            </td>
        </tr>
        <tr>        
            <td valign="baseline">
                Celular:
            </td>
            <td colspan="3">
                <input type="text" name="txtFoneCelular" id="txtFoneCelular" class="texto" size="25" maxlength="15" />
            </td>
       </tr>
       <tr>
            <td valign="baseline">
                E-mail:
            </td>
            <td colspan="3">
                <input type="text" name="txtEmail" id="txtEmail" class="texto" maxlength="25" size="35"/>
            </td>
        </tr>
        <tr>
            <td valign="baseline">
                Data Nascimento:
            </td>
            <td colspan="3">
                <input type="text" name="txtDataNascimento" id="txtDataNascimento" class="texto" maxlength="11" />&nbsp;dd/mm/aaaa
            </td>
        </tr>
        <tr>
            <td valign="baseline">
                Senha:
            </td>
            <td colspan="3">
                <input type="password" name="txtSenha" id="txtSenha" class="texto" maxlength="15" />
            </td>
        </tr>
		<tr>
            <td valign="baseline">
                Confirmação:
            </td>
            <td colspan="3">
                <input type="password" name="txtConfirmacao" id="txtSenha" class="texto" maxlength="15" />
            </td>
        </tr>
       <tr>
            <td valign="baseline">
                Sexo:
            </td>
            <td colspan="3">
                <input type="radio" name="rdSexo" value="M" checked />Masculino
                <input type="radio" name="rdSexo" value="F" />Feminino
            </td>
        </tr>
        <tr>
            <td colspan="4"><input type="submit" value="Cadastrar" name="btCadastrar"/></td>
        </tr>
    </table>
</div>
</form>
<?php
  // pagemaincontent recebe o conteudo do buffer
  $pagemaincontent = ob_get_contents(); 

  // Descarta o conteudo do Buffer
  ob_end_clean(); 

  /* Atribuição das Variáveis da página principal
  * Lembrando que podem ser colocadas novas variáveis,
  * conforme necessidade */
  $pagetitle = "Macrofone"; 

  //Include com o Template
  include("masterpage/master.php");
?>